Carbon


AcceptHighLevelEvent

Header: EPPC.h Carbon status: Unsupported

Obtains additional information associated with an event after receiving a high-level event (other than an Apple event).

OSErr AcceptHighLevelEvent (
    TargetID *sender, 
    UInt32 *msgRefcon, 
    void *msgBuff, 
    UInt32 *msgLen
);
sender

A pointer to a structure of type TargetID whose contents identify the sender of the event. The structure referenced through the sender parameter contains the session reference number that identifies the connection with the other application and the port name and location name of the sender.

msgRefcon

A pointer to a value that uniquely identifies the communication associated with this event. If you send a response to this event, you should specify the same value as that referenced through the msgRefcon parameter so that the sender of the event can associate the reply with the original request.

msgBuff

A pointer to a block of memory where the AcceptHighLevelEvent function should return any additional data associated with the event. Your application is responsible for allocating the memory for the additional data pointed to by the msgBuff parameter and for setting the msgLen parameter to the number of bytes that you have allocated for the data.

If the msgBuff parameter points to an area in memory that is not large enough to hold all the data associated with the event, AcceptHighLevelEvent returns as much data as the specified memory area can hold, returns the amount of data remaining in the msgLen parameter, and returns the result code bufferIsSmall.

msgLen

A pointer to a value that specifies the size of the data (in bytes) pointed to by the msgBuff parameter. If AcceptHighLevelEvent returns the result code bufferIsSmall, the value referenced through the msgLen parameter contains the number of bytes remaining. You can call AcceptHighLevelEvent again to receive the rest of the data.

function result

A result code.

DISCUSSION

When your application receives a high-level event, you can use the AcceptHighLevelEvent function to get additional data associated with the event. The AcceptHighLevelEvent function returns information that identifies the sender of the event and the unique message reference constant of the event.

Your application should allocate memory for any additional data associated with the event, then supply a pointer to the data area and also provide the length in bytes of the data area.

SPECIAL CONSIDERATIONS

The AcceptHighLevelEvent function may move or purge memory. You should not call this function from within an interrupt, such as in a completion function or VBL task.

AVAILABILITY

Not supported in Carbon. Not available in Carbon.

CARBON NOTES

The High Level Event APIs (EPPC.h) are not supported in Carbon. Instead, use Apple events.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)